package com.zy.edu.controller;


import com.zy.edu.bean.CourseChapter;
import com.zy.edu.bean.CourseChapterClass;
import com.zy.edu.bean.InputParam;
import com.zy.edu.service.ClassinfoService;
import com.zy.edu.service.CourseChapterClassService;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author HuangHaiShui
 * @since 2021-07-27
 */
@RestController
@RequestMapping("/course/class")
public class CourseChapterClassController {
    @Resource
    CourseChapterClassService courseChapterClassService;

    //将某个班级的课时修改为 已上过  状态
    @RequestMapping("/edit")
    public Map updateStatus(CourseChapterClass chapter, InputParam inputParam){
        return courseChapterClassService.updateStatus(chapter,inputParam);
    }

    //获取班级里某个课程的所有课时信息
    @RequestMapping("/getByClassAndCourse")
    public Map getByClassAndCourse(  InputParam inputParam  ){

        return courseChapterClassService.getByClassAndCourse(inputParam);
    }
}

